<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page import="java.util.*,model.V_user_priv,com.et.mvc.JsonView"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>涉案财物管理系统</title>
<link rel="stylesheet" href="../easyui/themes/default/easyui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../css/main.css" type="text/css"
	media="screen" />
<script src="../easyui/jquery-1.4.4.min.js"></script>
<script src="../easyui/jquery.easyui.min.js"></script>
<!-- mytab -->
<script src="../myjs/myTab.js"></script>
<!-- sys -->
<script src="../myjs/sys.js"></script>

<!-- datenow -->
<script src="../myjs/datenow.js"></script>
<script>
	$(function() {
		tabClose();
		tabCloseEven();
		// 时间显示
		startclock();
		if ($.browser.msie) {
			setTimeout("CollectGarbage()", 1);
		}
		
		//加载首页
		$('#miantab').tabs('add', {
			title : '首页',
			closable : false,
			content :  '<iframe  frameborder="0" src="../views/portal/portal.html" style="width:100%;height:100%;">'
		});
		/*$("#miantab").tabs({
			onBeforeClose : function(title) {
				$('#tab').tabs('select', title);
				var pp = $('#tab').tabs('getSelected');
				var tabs = pp.panel('options');
				var parentobj = document.getElementById("parent_frame"
						+ tabs.id);
				if (parentobj != null) {
					parentobj.src = null;
					parentobj.contentWindow.document.write("");
					parentobj.contentWindow.close();
					parentobj.parentNode.removeChild(parentobj);
					parentobj = null;
				}
				if ($.browser.msie) {
					setTimeout("CollectGarbage()", 1);
				}
			}
		});
		*/
	});
</script>
</head>
<body class="easyui-layout">
<div region="north" border="false"
	style="background: #fafafa; color: #2d5593; height: 60px;">
<div id='header'>
<div id='welcome'>欢迎您,<<%=session.getAttribute("user_type")%>></<%=session.getAttribute("user_type")%>>&nbsp;<%=session.getAttribute("realName")%>&nbsp;![<a
	href='/sacwxt'>安全退出</a>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
	id='systemTime' name='systemTime'
	style='background: transparent; font-size: 9pt; border: 0; color: #000000'
	size=40></div>
<div id='toplinks'><a href='javascript:void(0)' onclick=
	;;
>个人信息</a>|<a
	href='javascript:void(0)' onclick=
	;;
>软件许可</a>| <a
	href='javascript:void(0)' onclick=
	;;
>技术支持</a>|<a
	href='javascript:void(0)' onclick=
	;;
>关于</a>| <a
	href='javascript:void(0)' onclick=
	;;
>帮助</a></div>
</div>
</div>
<!-- 菜单导航 -->
<div region="west" split="true" title="导航菜单"
	style="width: 150px; padding1: 1px;">
<div class="easyui-accordion" fit="true" border="false">
<%
	List hm = (List) session.getAttribute("userpriv_json");
	//存在的主菜单
	List menus = new ArrayList();
	Iterator mit = hm.iterator();
	while (mit.hasNext()) {
		V_user_priv vup = (V_user_priv) mit.next();
		//去掉已经包含的菜单，保证不重复
		if (!menus.isEmpty() && menus.contains(vup.getMenu_name()))
			continue;
		menus.add(vup.getMenu_name());
	}
	Iterator it = menus.iterator();
	while (it.hasNext()) {
		String menu_name = (String) it.next();
		//主菜单
		out.println("<div title=" + menu_name + " class='accmenu'>");
		out.println("<table style='width: 100%;'>");
		//功能项开始
		for (int j = 0; j < hm.size(); j++) {
			V_user_priv uv = (V_user_priv) hm.get(j);
			//判断角色功能是否在菜单下
			if (!uv.getMenu_name().trim().equals(menu_name))
				continue;
			out.println("<tr>");
			out.println("<td>");
			out.println("<a href=javascript:addTab('"
					+ uv.getFunc_name().trim() + "','"
					+ uv.getFunc_url().trim() + "','"
					+ uv.getFunc_css().trim() + "')>");
			out.println("<img src='" + uv.getImage().trim() + "'>");
			out.println("</img>");
			out.println("<br/>");
			out
					.println("<span>" + uv.getFunc_name().trim()
							+ "</span>");
			out.println("</a>");
			out.println("</td>");
			out.println("</tr>");
		}
		//功能项结束
		out.println("</table>");
		out.println("</div>");

	}
%>
</div>
</div>

<div region="center">
<div class="easyui-tabs" id="miantab" fit="true">
</div>
</div>



<div region="south" border="false" class="copy_nav">涉案物资系统&copy;2012.</div>

<!-- tab右键菜单 开始 -->

<div id="mm" class="easyui-menu" style="width: 150px;">
<div id="mm-tabcloseall">全部关闭</div>
<div id="mm-tabcloseother">除此之外全部关闭</div>
<div class="menu-sep"></div>
<div id="mm-tabcloseright">当前页右侧全部关闭</div>
<div id="mm-tabcloseleft">当前页左侧全部关闭</div>
</div>

<!-- tab右键菜单 结束-->
</body>
</html>
